//
//  DFBaseLineCell.h
//  DFTimelineView
//
//  Created by Allen Zhong on 15/9/27.
//  Copyright (c) 2015年 Datafans, Inc. All rights reserved.
//

#import "UIImageView+WebCache.h"
#import "DFBaseLineItem.h"
#import "DFBigImageView.h"
#import "Const.h"
#import "DFLineLikeItem.h"


#define Margin 15

#define Padding 10

#define UserAvatarSize 40

#define  BodyMaxWidth [UIScreen mainScreen].bounds.size.width - 2*Margin




@protocol DFLineCellDelegate <NSObject>

@optional

-(void)onLike:(NSString *)contentId likeItem:(DFLineLikeItem *)likeItem type:(BOOL)type;

-(void) onComment:(NSString *) itemId;

-(void) onShare:(NSString *) itemId;

//-(void) onClickUser:(NSString *) userId;

-(void) onClickComment:(NSString *) commentId itemId:(NSString *) itemId;

//-(void) onClickTitleLabel:(NSString *)tribeId;


@end

@interface DFBaseLineCell : UITableViewCell


@property (nonatomic, strong) UIView *bodyView;

@property (nonatomic, weak) id<DFLineCellDelegate> delegate;

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier isManger:(BOOL)isManger;

-(void) updateWithItem:(DFBaseLineItem *) item;

-(CGFloat) getCellHeight:(DFBaseLineItem *) item;

-(CGFloat) getReuseableCellHeight:(DFBaseLineItem *)item;

-(void)updateBodyView:(CGFloat) height;


-(void) initDataWithArray:(NSArray *)array;
//-(UINavigationController *) getController;
//- (void)initDataWithDic:(NSDictionary *)dic;
@end
